package com.example.pilipili.dao;

import com.example.pilipili.pojo.entity.Like;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author liyv
 * @since 2023-12-01
 */
@Mapper
public interface LikeMapper extends BaseMapper<Like> {

    // 我的获赞
    @Select("select count(*) from love l join video v on l.vid = v.id where v.uid = #{uid}")
    int selectByVUid(@Param("uid") int uid) ;

}
